/*
 * Copyright (c) 2024 Syntiant Corp.  All rights reserved.
 * Contact at http://www.syntiant.com
 *
 * This software is available to you under a choice of one of two licenses.
 * You may choose to be licensed under the terms of the GNU General Public
 * License (GPL) Version 2, available from the file LICENSE in the main
 * directory of this source tree, or the OpenIB.org BSD license below.  Any
 * code involving Linux software will require selection of the GNU General
 * Public License (GPL) Version 2.
 *
 * OPENIB.ORG BSD LICENSE
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 	** SDK: v112.3.5-Samsung **
*/

#ifndef SYNTIANT_PACKAGE_TAGS_H
#define SYNTIANT_PACKAGE_TAGS_H

#ifdef __LINUX_KERNEL__
#include <linux/types.h>
#else
#include <stdint.h>
#endif

#define MAGIC_VALUE 0x53BDE5A1U

/**
 *@brief tag values common in packager and ilib
 */
enum syntiant_package_tag_values_e {
    TAG_HEADER = 0X1,
    TAG_FIRMWARE_VERSION_STRING_V1 = 0X2,
    TAG_PAD = 0X3,
    TAG_CHECKSUM = 0X4,
    TAG_NN_VERSION_STRING_V1 = 0X5,
    TAG_NDP10X_NN_CONFIG_V1 = 0X6,
    TAG_NDP10X_NN_PARAMETERS_V1 = 0X7,
    TAG_FIRMWARE = 0X8,
    TAG_NDP10X_HW_CONFIG_V1 = 0X9,
    TAG_NN_LABELS_V1 = 0XA,
    TAG_NDP10X_HW_CONFIG_V2 = 0XB,
    TAG_NDP10X_NN_PARAMETERS_V2 = 0XC,
    TAG_NN_PH_PARAMETERS_V1 = 0XD,
    TAG_NDP10X_B0_ENCRYPTED_FIRMWARE = 0XE,
    TAG_NN_PH_PARAMETERS_V2 = 0XF,
    TAG_NN_PH_PARAMETERS_V3 = 0X10,
    TAG_NN_VERSION_STRING_V2 = 0X12,
    TAG_PACKAGE_VERSION_STRING = 0X13,
    TAG_NDP10X_B0_NN_CONFIG_V1 = 0X14,
    TAG_BOARD_CALIBRATION_PARAMS_V1 = 0X15,
    TAG_NDP10X_NN_PARAMETERS_V3 = 0X16,
    TAG_NN_PH_PARAMETERS_V4 = 0X17,
    TAG_NN_LABELS_V2 = 0X18,
    TAG_NDP10X_B0_NN_CONFIG_V2 = 0X19,
    TAG_NDP10X_B0_NN_CONFIG_V3 = 0X1A,
    TAG_BOARD_CALIBRATION_PARAMS_V2 = 0X1B,
    TAG_UILIB_EXT_CLK = 0X1C,
    TAG_UILIB_INT_CLK = 0X1D,
    TAG_UILIB_SPI_WRITE = 0X1E,
    TAG_UILIB_MCU_WRITE = 0X1F,
    TAG_NDP12X_A0_NN_PARAMETERS_V1 = 0X20,
    TAG_NDP120_B0_NN_PARAMETERS_ENCRYPTED_V1 = 0X21,
    TAG_UNENCRYPTED_FIRMWARE_V1 = 0X22,
    TAG_NDP12X_A0_ENCRYPTED_FIRMWARE_V1 = 0X23,
    TAG_NDP12X_A0_NN_CONFIG_V1 = 0X24,
    TAG_NDP12X_A0_NN_CONFIG_ENCRYPTED_V1 = 0X25,
    TAG_NDP12X_A0_HW_CONFIG_V1 = 0X26,
    TAG_NDP12X_A0_HW_CONFIG_ENCRYPTED_V1 = 0X27,
    TAG_NDP12X_A0_DSP_FIRMWARE_V1 = 0X28,
    TAG_NDP12X_A0_DSP_ENCRYPTED_FIRMWARE_V1 = 0X29,
    TAG_DSP_FIRMWARE_VERSION_STRING_V1 = 0X2A,
    TAG_BOARD_CALIBRATION_PARAMS_V3 = 0X2B,
    TAG_SYNPKG_FILE = 0X2C,
    TAG_TFLITE_MODEL_FILE = 0X2D,
    TAG_POSTERIOR_FILE = 0X2E,
    TAG_TFLITE_FB_FILE = 0X2F,
    TAG_COMPOSITE_SOUND_CONTENT = 0X30,
    TAG_NN_PH_PARAMETERS_V5 = 0X31,
    TAG_NDP12X_A0_NN_METADATA = 0X32,
    TAG_NDP12X_A0_DSP_FLOW_RULES_V1 = 0X33,
    /* Unsupported TAG_NN_PHP_COLLECTION_V1 = 0X34, */
    TAG_NN_LABELS_V3 = 0X35,
    TAG_NDP120_B0_DSP_FLOW_COLLECTION_V2 = 0X36,
    TAG_NDP12X_A0_MCU_ORCHERSTARTOR_V1 = 0X37,
    TAG_BOARD_CALIBRATION_PARAMS_V4 = 0X38,
    TAG_HOST_CONFIG = 0X39,
    TAG_PACKAGERLIB_VERSION_STRING = 0X3A,
    TAG_NN_PARAMS = 0X3B,
    TAG_CORE2_DSP_ALGO_ATTACH_V1 = 0X3D,
    /* TAG_NDP120_B0_DSP_FE_CONFIG_V1 = 0X3E deprecated */
    TAG_NDP120_B0_NN_PARAMETERS_V1 = 0X3F,
    TAG_NDP120_B0_NN_METADATA = 0X40,
    TAG_NDP120_B0_DSP_FLOW_COLLECTION_V1 = 0X41,
    TAG_NDP120_B0_MCU_ORCHESTRATOR_V1 = 0X42,
    TAG_NDP120_B0_DSP_FIRMWARE_V1 = 0X43,
    TAG_NDP120_B0_HW_CONFIG_V1 = 0X44,
    TAG_NN_PH_PARAMETERS_V6 = 0X45,
    TAG_NDP10X_B0_NN_CONFIG_ENCRYPTED_V1 = 0X46,
    TAG_NDP10X_B0_NN_PARAMETERS_ENCRYPTED_V1 = 0X47,
    TAG_NDP10X_B0_HW_CONFIG_ENCRYPTED_V1 = 0X48,
    TAG_NDP120_B0_SOFTMAX_V1 = 0X49,
    TAG_NN_PHP_COLLECTION_V7 = 0x4D,
    TAG_NDP120_B0_DNN_POWER_CFG_V1 = 0x4E,
    /* Deprecated TAG_NDP115_A0_FIRMWARE = 0x4F, */
    TAG_NDP115_A0_DSP_FIRMWARE_V1 = 0x50,
    TAG_NDP115_A0_NN_PARAMETERS_V1 = 0x51,
    /* Deprecated TAG_NDP120_B0_DSP_FE_CONFIG_V2 = 0X52, */
    TAG_PACKAGE_BINARY_INTERFACE_VERSION = 0X53,
    TAG_NDP120_B0_MCU_ORCHESTRATOR_V3 = 0X54,
    TAG_CORE2_PDM_CFG_V1 = 0x55,
    TAG_CORE2_I2S_IN_CFG_V1 = 0x56,
    TAG_CORE2_I2S_OUT_CFG_V1 = 0x57,
    TAG_CORE2_DSP_SYNC_V1 = 0x58,
    TAG_CORE2_SENSOR_CONFIG_V1 = 0x59,
    TAG_DSP_FIRMWARE_VERSION_STRING_V2 = 0x5A,
    TAG_PACKAGE_VERSION_STRING_V2 = 0x5B,
    TAG_FIRMWARE_VERSION_STRING_V2 = 0x5C,
    TAG_NDP115_A0_PIN_MUX_CONFIG_V1 = 0x5D,
    TAG_INTERRUPT_AUTO_CLEAR = 0x5E,
    TAG_CORE2_GRU_METADATA_V1 = 0x5F,
    TAG_CORE2_PDM_CFG_V2 = 0x60,
    TAG_NDP120_B0_DSP_FE_CONFIG_V3 = 0x62,
    TAG_CORE2_DSP_MCU_SECONDARY_VALIDATION_V1 = 0x63,
    TAG_CORE2_MCU_SECONDARY_VALIDATION_V1 = 0x64,
    TAG_CORE2_MIC_SETTINGS = 0x65,
    TAG_DSP_ALGO_PARAMS_V1 = 0x66,
    TAG_NDP120_B0_NN_METADATA_V2 = 0x67,
    TAG_OBJECTDECODER_PH_PARAMETERS_V1 = 0x68
};

#define TAG_MULTI_SEGMENT_BIT 0x80000000
#endif
